<?php
namespace Lge;

if(!defined('LGE')){
    exit('Include Permission Denied!');
}

class Controller_Test extends BaseController
{
    public function index()
    {
        $data  = array(
            'passport' => '234sdfsd',
        );
        // 规则格式1
        $rules = array(
            'passport'  => [ 'passport']
        );

        var_dump(Lib_Validator::check($data, $rules));
        return;
        $array = array(
            'name' => 'john',
            'age'  => 31,
            'list' => array(
                array('a', 'b', 'c'),
                array('d', 'e', 'f'),
            ),
            'item' => array(
                'title'    => 'make"he moon',
                'name'     => 'make\'he moon',
                'content'  => '\'[}]{[}he moon',
            )
        );

        echo json_encode($array);
        echo "\n\n";

        $array = array(
            1,
            2,
            3,
        );

        echo json_encode($array);
        echo "\n\n";

        $array = array(
            array(1,2,3),
            array(4,5,6),
        );

        echo json_encode($array);
        echo "\n\n";

        $array = array(
            "k" => "v",
            array(1,2,3),
        );

        echo json_encode($array);
        echo "\n\n";
    }
}
